U.S. patent application Ser. No. 11/482,603 describes how isolated JAVA applications (“isolates”) can share objects with each other by creating such objects within a memory area that all of those isolates can access. Such a memory area is referred to as a “shared object region.” As described in the foregoing application, after one isolate has created an object within a shared object region, other isolates (which already may be attached to the shared object region or which may later attach to the shared object region) may access that object within the shared object region. Those other isolates also may create objects within the shared object region. Objects created in the shared object region may persist even after the isolate that created those objects terminates.
In the JAVA environment described in the foregoing application, all objects that are contained in a shared object region are instances of classes that are defined either by (a) a shared class loader that is dedicated exclusively to that shared object region or (b) the bootstrap class loader. Each isolate has its own bootstrap class loader, but each bootstrap class loader exhibits the same behavior with respect to a class type definition. All classes that are defined by the shared class loader are subclasses (immediate or non-immediate) of at least one class that is defined by the bootstrap class loader. This is because, according to the JAVA programming language, all classes are part of a class hierarchy. The “Object” class sits at the apex of this class hierarchy; all other classes are subclasses (immediate or non-immediate) of the “Object” class. The “Object” class is one of the classes that are defined by the bootstrap class loader.
At any given time during the execution of a JAVA program, each class to which that program refers may be in any one of several different states. For example, a class may be in the “loaded” state, the “linked” state, the “initializing” state, or the “initialized” state. Typically, a class will proceed from one state to another (e.g., from the “loaded” state to the “linked” state to the “initializing” state to the “initialized” state) during the execution of the program that uses the class. If separate isolates that are attached to the same shared object region see the class of a particular object that is stored in that region as being in different states at the same time, then one or more of those isolates may function improperly. For example, if a particular shared object region contains an object that is an instance of an “employee” class, and if one isolate that is attached to that region sees the “employee” class as being in the “initialized” state at a particular instance in time, and if another isolate that is attached to that region sees the “employee” class as being in the “loaded” state at the particular instance in time, then one or both of those isolates may function improperly. Further, the class that sees the “employee” class as being in the “loaded” state will violate the specifications of the JAVA programming language since the specifications state that a class must be initialized before instances of it may be created.